﻿namespace Tester.DL645.Instructions
{
    /// <summary>
    /// 电流指令
    /// </summary>
    public class PhaseCurrentInstruction : GeneralInstruction
    {

        public Core.Phase Phase { get; private set; }
        /// <summary>
        ///  A 相处理了
        /// </summary>
        /// <param name="address"></param>
        public PhaseCurrentInstruction(string address, Core.Phase phase)
             : base(address, 0X11, phase== Core.Phase.A? Core.Constants.APhaseCurrentCommandIdentifier
             : (phase== Core.Phase.B?new byte[] { 0X02 + 0X33, 0X02 + 0X33, 0X02 + 0X33, 0X33 } : new byte[] { 0X02 + 0X33, 0X02 + 0X33, 0X03 + 0X33, 0X33 }))
        {
            Phase = phase;
        }


    }
}
